<div id="left_side">
	<div id="home">
		<!--Hilight-->
		<?php if(!empty($dataHomeHilight)):?>
		<div id="home_hilight">
			<div class="cycleElementsContainer" id="slider_hilight">
				<div class="slider">
				<ul>
					<?php foreach($dataHomeHilight as $key => $value):?>
					<li>
						<?php echo $value;?>
					</li>				
					<?php endforeach;?>
				</ul>
				</div>
				<a href="javascript:void(0);" class="btn_arrow prev" id="nav_slider_hilight_left"></a>
				<a href="javascript:void(0);" class="btn_arrow next" id="nav_slider_hilight_right"></a>
			</div>
			<div class="navigation">
				<?php foreach($dataHomeHilight as $key => $value):?>
					<a href="#" data-position="<?php echo intval($key+1);?>" class="cycleToPointHighlight navBg"><?php echo intval($key+1);?></a> 
				<?php endforeach;?>
			</div>				
		</div>
		<?php endif;?>
		<!--You2Play Intrend-->
		<?php if(!empty($dataHomeIntrend)):?>
		<div id="home_intrend">
			<h2 class="homeHeader headerIntrend">You2Play Intrend</h2>
			<span id="song_of_the_day"></span>
			<ul>
				<?php foreach($dataHomeIntrend as $key => $value):?>
				<li>
					<a class="_player slideUp" href="<?php echo $value['url'];?>" target="_blank">
						<div class="image">
							<?php echo exec_image(array(
								'folder' => ''.($value['module'] == "song" ? 'album':$value['module']).'',
								'dimension' => ($value['module'] == "song" ? '250x250':'200x120'),
								'file_name' => @$value['image'],
								'alt' => ''.$value['name'].'',	
								'title' => ''.$value['name'].''	
								)
							);?>
						</div>
					</a>	
					<a class="_player info" href="<?php echo $value['url'];?>" target="_blank">
						<?php if($value['module'] == "song"):?>
							<span class="mediaName">เพลง : <?php echo $value['name'];?></span>
							<span class="artistName">ศิลปิน : <?php echo $value['artist'];?></span>
						<?php elseif($value['module'] == "video" && $value['is_mv'] == 1):?>
							<span class="mediaName"><?php echo $value['name'];?></span>
							<span class="artistName"><?php echo $value['artist'];?></span>							
						<?php else:?>
							<h3><?php echo $value['name'];?></h3>
						<?php endif;?>
					</a>										
				</li>
				<?php endforeach;?>
			</ul>
		</div>
		<?php endif;?>

		<!--Retroact Video-->
		<div id="home_retroact_video">
			<h2 class="homeHeader headerYou2PlayTV">ดู You2Play TV ย้อนหลัง</h2>
			<a href="<?php echo $video_url.'you2playtv';?>" target="_blank" class="readmore">ดูทั้งหมด&nbsp;&raquo;</a>
			<ul>
				<li>
					<!--Vdo Player-->
					<div id="vdoPlayer">
						<?php if($this->agent->is_mobile()):?>
							<video id='my_video' controls muted preload='none'></video>
						<?php endif;?>
					</div>
					<script type="text/javascript" language="javascript">
					(function($) {
					/*whatever jQuery stuff*/
						$(function(){					
							var is_mobile = '<?php echo $this->agent->is_mobile();?>';
							var url_html5 = "http://203.151.21.9:1935/live/You2PlayTV_3/playlist.m3u8";
							var url_flash = "rtmp://203.151.21.9/live";
							if(is_mobile){
								//Set Video Source
								$('#my_video').append("<source id='mp4' src='"+url_html5+"' type='video/mp4'>");
								$('#my_video').attr('src',""+url_html5+"");
								$('#my_video').attr('width',315);
								$('#my_video').attr('height',205);		
								// videoplaza sdk, 4 sec time-out, callback function
								loadScript("<?php echo js_asset_url('media/html5-sdk-1.0.12.15.1-ea.min.js');?>",4000,initVideoplaza);
								// *** START - videoplaza plugin config ***
								vpConfig = {
									vphost : 'http://th-pmdplus.videoplaza.tv',
									category : 'live',
									tags : ['standard'],
									flags: [],
									playbackPosition: [] // mid-roll cue points, if any.
								}
								// *** END - videoplaza plugin config ***
								//Auto Play && Loop
								$('#my_video').attr('autoplay','autoplay');	
							} else {
								jwplayer("vdoPlayer").setup({
									autostart: true,
									mute: true,
							      	flashplayer: "<?php echo js_asset_url('media/player.swf');?>",
							      	width: 315,
							      	height: 205,
									streamer: ""+url_flash+"",
									file: "You2PlayTV_3",
									provider: "rtmp",
/*								  "plugins": {
								    "ova-jw": {
									  "canFireEventAPICalls": true,
								      "ads": {
								        "skipAd": {
								          "enabled": "true"
								        },
								        "schedule": [
								          {
								            "position": "pre-roll",
								            "tag": ""+generatTag('<?php //echo json_encode($dataAds);?>')+""
								          },
										  {
										  	"position": "post-roll",
											"tag": "http://ads.you2play.com/openx/delivery/fc.php?script=bannerTypeHtml:vastInlineBannerTypeHtml:vastInlineHtml&source=&format=vast&charset=UTF_8&nz=1&zones=z1=166"
										  } 	  
								        ]
								      }
								    }
								  }	*/																
							      	plugins: "<?php echo js_asset_url('media/vp_plugin.swf');?>",
							      	vpdomain: "http://th-pmdplus.videoplaza.tv",
							      	vpshares: "live",
									vptimeout: 15000,
							      	vptags: "",
									stretching : "exactfit",
									closebuttontimeout: 5
								});	
								
								jwplayer().onFullscreen(function(event){
									if(event.fullscreen){
										jwplayer().setFullscreen(false);
										window.location.href = 'http://www.you2play.com/live';
										//window.open('http://www.you2play.com/live','_live');
									}
									//jwplayer().resize(315,205);
									//alert('the volume is now: ' + event.volume);
								});									
							}
						});	
					})(jQuery);					
					</script>									
				</li>
				<?php if(!empty($dataVideoTv)) foreach($dataVideoTv as $key => $value):?>			
					<li>
						<a class="_player slideUp" href="<?php echo $video_url.'play/'.$value->video_id.'-'.seo_url($value->video_name);?>" target="_blank">
							<div class="image">
								<?php echo exec_image(array(
									'folder' => 'video',
									'dimension' => '155x100',
									'file_name' => @$value->video_thumb_name.'.'.@$value->video_thumb_ext,
									'alt' => ''.$value->video_name.'',	
									'title' => ''.$value->video_name.''	
									)
								);?>						
							</div>
						</a>
						<a class="_player info" href="<?php echo $video_url.'play/'.$value->video_id.'-'.seo_url($value->video_name);?>" target="_blank"><?php echo $value->video_name;?></a>
					</li>
				<?php endforeach;?>
			</ul>
		</div>
		
		<!--Music-->
		<div id="home_music">
			<h2 class="homeHeader headerMusic">ฟังเพลงใหม่</h2>
			<!--Thai-->
			<?php if(!empty($dataSongThai)):?>
				<h2 class="subHeader">ฟังเพลงไทย</h2>
				<div class="cycleElementsContainer" id="slider_music_thai">
					<div class="slider">
					<ul>
						<?php foreach($dataSongThai as $key => $value):?>
							<li>
								<a class="_player" href="<?php echo $music_url.'play/'.$value->song_id.'-'.seo_url($value->song_name);?>" target="_blank">
									<div class="image">
										<?php echo exec_image(array(
											'folder' => 'album',
											'dimension' => '140x140',
											'file_name' => @$value->image->album_file_name.'.'.@$value->image->album_file_ext,
											'alt' => ''.$value->song_name.'',	
											'title' => ''.$value->song_name.''	
											)
										);?>					
									</div>
								</a>
								<div class="expandActionMenu">
									<div class="frameImage"></div>
									<a href="javascript:void(0);" class="drop_menu"><span class="arrowDown"></span></a>
									<dl>
										<dt>
											<a href="javascript:void(0);" class="socialShare" rel="music-<?php echo $value->song_id;?>">Share &raquo;</a>
										</dt>
										<dt>
											<a href="<?php echo $playlist_url.'music/'.$value->song_id.'-'.seo_url($value->song_name);?>" target="_blank" title="add to playlist">Add To Station</a>
										</dt>
										<?php if(!empty($value->chords_id)):?>
											<dt><a href="<?php echo $chord_url.'play/'.$value->chords_id.'-'.seo_url($value->song_name);?>" target="_blank">Chord & Tab</a></dt>
										<?php endif;?>
									</dl>
								</div>									
								<!--Playlist-->
								<a href="<?php echo $playlist_url.'music/'.$value->song_id.'-'.seo_url($value->song_name);?>" target="_blank" class="_playlist" title="add to playlist"></a>								
								<a class="_player" href="<?php echo $music_url.'play/'.$value->song_id.'-'.seo_url($value->song_name);?>" target="_blank">
									<h3><?php echo $value->song_name;?></h3>
								</a>
								<div class="artist">
									<?php foreach($value->artist as $key2 => $artist):?>
										<?php echo ($key2 > 0 ? '/':'');?>
										<a href="<?php echo $artist_url.'summary/'.$artist->artist_id.'-'.seo_url($artist->artist_name);?>" target="_blank"><?php echo $artist->artist_name;?></a>
									<?php endforeach;?>
								</div>
								<div class="views">ฟังเพลง <?php echo number_format($value->views);?> ครั้ง</div>
							</li>			
						<?php endforeach;?>
					</ul>
					</div>
					<a href="javascript:void(0);" class="btn_arrow prev" id="nav_slider_music_thai_left"></a>
					<a href="javascript:void(0);" class="btn_arrow next" id="nav_slider_music_thai_right"></a>
					<a class="readMore" target="_blank" href="http://music.you2play.com/new_released/thai">ดูทั้งหมด&nbsp;&raquo;</a>
				</div>
			<?php endif;?>
			<!--Inter-->
			<?php if(!empty($dataSongInter)):?>
				<h2 class="subHeader">ฟังเพลงสากล</h2>
				<div class="cycleElementsContainer" id="slider_music_inter">
					<div class="slider">
					<ul>
						<?php foreach($dataSongInter as $key => $value):?>
							<li>
								<a class="_player" href="<?php echo $music_url.'play/'.$value->song_id.'-'.seo_url($value->song_name);?>" target="_blank">
									<div class="image">
										<?php echo exec_image(array(
											'folder' => 'album',
											'dimension' => '140x140',
											'file_name' => @$value->image->album_file_name.'.'.@$value->image->album_file_ext,
											'alt' => ''.$value->song_name.'',	
											'title' => ''.$value->song_name.''	
											)
										);?>
									</div>
								</a>
								<div class="expandActionMenu">
									<div class="frameImage"></div>
									<a href="javascript:void(0);" class="drop_menu"><span class="arrowDown"></span></a>
									<dl>
										<dt>
											<a href="javascript:void(0);" class="socialShare" rel="music-<?php echo $value->song_id;?>">Share &raquo;</a>
										</dt>
										<dt>
											<a href="<?php echo $playlist_url.'music/'.$value->song_id.'-'.seo_url($value->song_name);?>" target="_blank" title="add to playlist">Add To Station</a>
										</dt>
										<?php if(!empty($value->chords_id)):?>
											<dt><a href="<?php echo $chord_url.'play/'.$value->chords_id.'-'.seo_url($value->song_name);?>" target="_blank">Chord & Tab</a></dt>
										<?php endif;?>
									</dl>
								</div>							
								<!--Playlist-->
								<a href="<?php echo $playlist_url.'music/'.$value->song_id.'-'.seo_url($value->song_name);?>" target="_blank" class="_playlist" title="add to playlist"></a>								
								<a class="_player" href="<?php echo $music_url.'play/'.$value->song_id.'-'.seo_url($value->song_name);?>" target="_blank">
									<h3><?php echo $value->song_name;?></h3>
								</a>
								<div class="artist">
									<?php foreach($value->artist as $key2 => $artist):?>
										<?php echo ($key2 > 0 ? '/':'');?>
										<a href="<?php echo $artist_url.'summary/'.$artist->artist_id.'-'.seo_url($artist->artist_name);?>" target="_blank"><?php echo $artist->artist_name;?></a>
									<?php endforeach;?>
								</div>
								<div class="views">ฟังเพลง <?php echo number_format($value->views);?> ครั้ง</div>
							</li>			
						<?php endforeach;?>
					</ul>
					</div>
					<a href="javascript:void(0);" class="btn_arrow prev" id="nav_slider_music_inter_left"></a>
					<a href="javascript:void(0);" class="btn_arrow next" id="nav_slider_music_inter_right"></a>
					<a class="readMore" target="_blank" href="http://music.you2play.com/new_released/inter">ดูทั้งหมด&nbsp;&raquo;</a>
				</div>
			<?php endif;?>
			<!--Asian-->
			<?php if(!empty($dataSongAsian)):?>
				<h2 class="subHeader">ฟังเพลงเอเชียน</h2>
				<div class="cycleElementsContainer" id="slider_music_asian">
					<div class="slider">
					<ul>
						<?php foreach($dataSongAsian as $key => $value):?>
							<li>
								<a class="_player" href="<?php echo $music_url.'play/'.$value->song_id.'-'.seo_url($value->song_name);?>" target="_blank">
									<div class="image">
										<?php echo exec_image(array(
											'folder' => 'album',
											'dimension' => '140x140',
											'file_name' => @$value->image->album_file_name.'.'.@$value->image->album_file_ext,
											'alt' => ''.$value->song_name.'',	
											'title' => ''.$value->song_name.''	
											)
										);?>								
									</div>
								</a>
								<div class="expandActionMenu">
									<div class="frameImage"></div>
									<a href="javascript:void(0);" class="drop_menu"><span class="arrowDown"></span></a>
									<dl>
										<dt>
											<a href="javascript:void(0);" class="socialShare" rel="music-<?php echo $value->song_id;?>">Share &raquo;</a>
										</dt>
										<dt>
											<a href="<?php echo $playlist_url.'music/'.$value->song_id.'-'.seo_url($value->song_name);?>" target="_blank" title="add to playlist">Add To Station</a>
										</dt>
										<?php if(!empty($value->chords_id)):?>
											<dt><a href="<?php echo $chord_url.'play/'.$value->chords_id.'-'.seo_url($value->song_name);?>" target="_blank">Chord & Tab</a></dt>
										<?php endif;?>
									</dl>
								</div>								
								<!--Playlist-->
								<a href="<?php echo $playlist_url.'music/'.$value->song_id.'-'.seo_url($value->song_name);?>" target="_blank" class="_playlist" title="add to playlist"></a>								
								<a class="_player" href="<?php echo $music_url.'play/'.$value->song_id.'-'.seo_url($value->song_name);?>" target="_blank">
									<h3><?php echo $value->song_name;?></h3>
								</a>
								<div class="artist">
									<?php foreach($value->artist as $key2 => $artist):?>
										<?php echo ($key2 > 0 ? '/':'');?>
										<a href="<?php echo $artist_url.'summary/'.$artist->artist_id.'-'.seo_url($artist->artist_name);?>" target="_blank"><?php echo $artist->artist_name;?></a>
									<?php endforeach;?>
								</div>
								<div class="views">ฟังเพลง <?php echo number_format($value->views);?> ครั้ง</div>
							</li>			
						<?php endforeach;?>
					</ul>
					</div>
					<a href="javascript:void(0);" class="btn_arrow prev" id="nav_slider_music_asian_left"></a>
					<a href="javascript:void(0);" class="btn_arrow next" id="nav_slider_music_asian_right"></a>
					<a class="readMore" target="_blank" href="http://music.you2play.com/new_released/asian">ดูทั้งหมด&nbsp;&raquo;</a>
				</div>
			<?php endif;?>
		</div>
		
		<!--Album Review-->
		<?php if(!empty($dataAlbumReview)):?>
			<div id="home_album_review" class="homeBgSprites">
				<h2>อัลบั้มรีวิว</h2>
				<div class="cycleElementsContainer" id="slider_album_review">
					<div class="slider">
						<ul>
							<?php foreach($dataAlbumReview as $key => $value):?>
							<li>
								<a class="slideUp" href="<?php echo $news_url.'archives/'.$value->news_id.'-'.seo_url($value->news_subject);?>" target="_blank">
									<div class="image">
										<?php echo exec_image(array(
											'folder' => 'news',
											'dimension' => '140x140',
											'file_name' => @$value->image->news_file_name.'.'.@$value->image->news_file_ext,
											'alt' => ''.@$value->news_subject.'',	
											'title' => ''.@$value->news_subject.''	
												)
										);?>
									</div>
								</a>
								<a class="info" href="<?php echo $news_url.'archives/'.$value->news_id.'-'.seo_url($value->news_subject);?>" target="_blank">
									<h3><?php echo $value->news_subject;?></h3>
								</a>
							</li>				
							<?php endforeach;?>
						</ul>
					</div>
					<a href="javascript:void(0);" class="btn_arrow prev" id="nav_slider_album_review_left"></a>
					<a href="javascript:void(0);" class="btn_arrow next" id="nav_slider_album_review_right"></a>
					<a href="<?php echo $news_url.'review';?>" target="_blank" class="readMore">ดูทั้งหมด&nbsp;&raquo;</a>
				</div>
			</div>
		<?php endif;?>

		<!--Dream Ticket-->
		<?php if(!empty($dataHomeDreamTicket)):?>
			<div id="home_dream_ticket">
				<h2>Dream Ticket - ศิลปินหน้าใหม่</h2>
				<div style="position:absolute;color:#f11a2a;float:right;top:6px;right:12px;font-style:italic;z-index: 1;">ส่งผลงานเพลงเพื่อโปรโมทได้ที่ <a href="mailto:webmaster@you2play.com" style="color:#f11a2a;">webmaster@you2play.com</a></div>
				<div style="position:absolute;float:right;top:30px;right:12px;z-index: 1;"><a href="<?php echo $music_url.'dreamticket/all/all/';?>" target="_self" style="color:#969696;font-weight: bold;">ดูทั้งหมด&nbsp;&raquo;</a></div>
				<ul>
					<?php foreach($dataHomeDreamTicket as $key => $value):?>
					<li>
						<?php if($key == 0):?>
							<a title="<?php echo $value->song_name;?>" href="<?php echo $music_url.'play/'.$value->song_id.'-'.seo_url($value->song_name);?>" class="slideUp" target="_blank">
								<div class="image">
									<?php echo exec_image(array(
										'folder' => 'album',
										'dimension' => '200x200',
										'file_name' => @$value->image->album_file_name.'.'.@$value->image->album_file_ext,
										'alt' => ''.$value->song_name.'',	
										'title' => ''.$value->song_name.''	
										)
									);?>
								</div>
							</a>
							<a title="<?php echo $value->song_name;?>" href="<?php echo $music_url.'play/'.$value->song_id.'-'.seo_url($value->song_name);?>" target="_blank" class="_player info">
								<h3><?php echo $value->song_name;?></h3>
								<div class="artist">
									<?php foreach($value->artist as $key2 => $artist):?>
										<?php echo ($key2 > 0 ? '/':'');?>
										<?php echo $artist->artist_name;?>
									<?php endforeach;?>
								</div>
							</a>
						<?php else:?>
							<a title="<?php echo $value->song_name;?>" href="<?php echo $music_url.'play/'.$value->song_id.'-'.seo_url($value->song_name);?>" target="_blank">
								<div class="image">
									<?php echo exec_image(array(
										'folder' => 'album',
										'dimension' => '40x40',
										'file_name' => @$value->image->album_file_name.'.'.@$value->image->album_file_ext,
										'alt' => ''.$value->song_name.'',	
										'title' => ''.$value->song_name.''	
										)
									);?>
								</div>
							</a>						
							<a class="_player" href="<?php echo $music_url.'play/'.$value->song_id.'-'.seo_url($value->song_name);?>" target="_blank">
								<h3><?php echo $value->song_name;?></h3>
							</a>
							<div class="artist">
								<?php foreach($value->artist as $key2 => $artist):?>
									<?php echo ($key2 > 0 ? '/':'');?>
									<a href="<?php echo $artist_url.'summary/'.$artist->artist_id.'-'.seo_url($artist->artist_name);?>" target="_blank"><?php echo $artist->artist_name;?></a>
								<?php endforeach;?>
							</div>
						<?php endif;?>
					</li>
					<?php endforeach;?>
				</ul>
			</div>
		<?php endif;?>
		<!--Video-->
		<div id="home_video">
			<h2 class="homeHeader headerVideo">วิดีโอ</h2>
			<!--Hilight-->
			<?php if(!empty($dataVideoHilight)):?>
			<h2 class="subHeader">วิดีโอแนะนำ</h2>
			<ul class="hilight">
				<?php foreach($dataVideoHilight as $key => $value):?>
					<li>
						<a title="<?php echo $value->video_name;?>" href="<?php echo $video_url.'play/'.$value->video_id.'-'.seo_url($value->video_name);?>" title="<?php echo $value->video_name;?>" target="_blank">
							<div class="image">
								<?php echo exec_image(array(
									'folder' => 'video',
									'dimension' => ($key == 0 ? '325x210':'140x90'),
									'file_name' => @$value->video_thumb_name.'.'.@$value->video_thumb_ext,
									'alt' => ''.$value->video_name.'',	
									'title' => ''.$value->video_name.''	
									)
								);?>
								<div class="frame"></div>
							</div>
						</a>
						<div class="info">	
							<h3>					
								<a class="_player" href="<?php echo $video_url.'play/'.$value->video_id.'-'.seo_url($value->video_name);?>" title="<?php echo $value->video_name;?>" target="_blank">
									<?php echo $value->video_name;?>
								</a>
							</h3>
							<span class="artist">
								<?php foreach($value->artist as $key2 => $artist):?>
									<?php echo ($key2 > 0 ? '/':'');?>
									<a href="<?php echo $artist_url.'summary/'.$artist->artist_id.'-'.seo_url($artist->artist_name);?>" target="_blank"><?php echo $artist->artist_name;?></a>
								<?php endforeach;?>
							</span>
							<span class="views">
								<?php echo number_format($value->views);?>
							</span>
						</div>
					</li>
				<?php endforeach;?>
			</ul>
			<?php endif;?>
			<!--Mv-->
			<?php if(!empty($dataVideoMV)):?>
				<h2 class="subHeader">มิวสิควิดีโอ MV</h2>
				<div class="cycleElementsContainer" id="slider_video_mv">
					<div class="slider">
					<ul>
						<?php foreach($dataVideoMV as $key => $value):?>
							<li>
								<a class="_player" href="<?php echo $video_url.'play/'.$value->video_id.'-'.seo_url($value->video_name);?>" title="<?php echo $value->video_name;?>" target="_blank">
									<div class="image">
										<?php echo exec_image(array(
											'folder' => 'video',
											'dimension' => '140x90',
											'file_name' => @$value->video_thumb_name.'.'.@$value->video_thumb_ext,
											'alt' => ''.$value->video_name.'',	
											'title' => ''.$value->video_name.''	
											)
										);?>								
									</div>
									<div class="frame"></div>
								</a>
								<div class="info">
									<h3>					
										<a class="_player" href="<?php echo $video_url.'play/'.$value->video_id.'-'.seo_url($value->video_name);?>" title="<?php echo $value->video_name;?>" target="_blank">
											<?php echo $value->video_name;?>
										</a>
									</h3>
									<span class="artist">
										<?php foreach($value->artist as $key2 => $artist):?>
											<?php echo ($key2 > 0 ? '/':'');?>
											<a href="<?php echo $artist_url.'summary/'.$artist->artist_id.'-'.seo_url($artist->artist_name);?>" target="_blank"><?php echo $artist->artist_name;?></a>
										<?php endforeach;?>
									</span>
									<span class="views">
										<?php echo number_format($value->views);?>
									</span>
								</div>
							</li>
						<?php endforeach;?>
					</ul>
					</div>
					<a href="javascript:void(0);" class="btn_arrow prev" id="nav_slider_video_mv_left"></a>
					<a href="javascript:void(0);" class="btn_arrow next" id="nav_slider_video_mv_right"></a>
					<a class="readMore" target="_blank" href="http://video.you2play.com/mv/new_released">ดูทั้งหมด&nbsp;&raquo;</a>
				</div>
			<?php endif;?>
			<!--Interview-->
			<?php if(!empty($dataVideoInterview)):?>
				<h2 class="subHeader">คลิปสัมภาษณ์</h2>
				<div class="cycleElementsContainer" id="slider_video_interview">
					<div class="slider">
					<ul>
						<?php foreach($dataVideoInterview as $key => $value):?>
							<li>
								<a class="_player" href="<?php echo $video_url.'play/'.$value->video_id.'-'.seo_url($value->video_name);?>" title="<?php echo $value->video_name;?>" target="_blank">
									<div class="image">
										<?php echo exec_image(array(
											'folder' => 'video',
											'dimension' => '140x90',
											'file_name' => @$value->video_thumb_name.'.'.@$value->video_thumb_ext,
											'alt' => ''.$value->video_name.'',	
											'title' => ''.$value->video_name.''	
											)
										);?>								
									</div>
									<div class="frame"></div>
								</a>
								<div class="info">
									<h3>					
										<a class="_player" href="<?php echo $video_url.'play/'.$value->video_id.'-'.seo_url($value->video_name);?>" title="<?php echo $value->video_name;?>" target="_blank">
											<?php echo $value->video_name;?>
										</a>
									</h3>
									<span class="artist">
										<?php foreach($value->artist as $key2 => $artist):?>
											<?php echo ($key2 > 0 ? '/':'');?>
											<a href="<?php echo $artist_url.'summary/'.$artist->artist_id.'-'.seo_url($artist->artist_name);?>" target="_blank"><?php echo $artist->artist_name;?></a>
										<?php endforeach;?>
									</span>
									<span class="views">
										<?php echo number_format($value->views);?>
									</span>
								</div>
							</li>
						<?php endforeach;?>
					</ul>
					</div>
					<a href="javascript:void(0);" class="btn_arrow prev" id="nav_slider_video_interview_left"></a>
					<a href="javascript:void(0);" class="btn_arrow next" id="nav_slider_video_interview_right"></a>
					<a class="readMore" target="_blank" href="http://video.you2play.com/interview/new_released">ดูทั้งหมด&nbsp;&raquo;</a>
				</div>
			<?php endif;?>
			<!--Concert-->
			<?php if(!empty($dataVideoConcert)):?>
				<h2 class="subHeader">คลิปคอนเสิร์ต</h2>
				<div class="cycleElementsContainer" id="slider_video_concert">
					<div class="slider">
					<ul>
						<?php foreach($dataVideoConcert as $key => $value):?>
							<li>
								<a class="_player" href="<?php echo $video_url.'play/'.$value->video_id.'-'.seo_url($value->video_name);?>" title="<?php echo $value->video_name;?>" target="_blank">
									<div class="image">
										<?php echo exec_image(array(
											'folder' => 'video',
											'dimension' => '140x90',
											'file_name' => @$value->video_thumb_name.'.'.@$value->video_thumb_ext,
											'alt' => ''.$value->video_name.'',	
											'title' => ''.$value->video_name.''	
											)
										);?>								
									</div>
									<div class="frame"></div>
								</a>
								<div class="info">
									<h3>					
										<a class="_player" href="<?php echo $video_url.'play/'.$value->video_id.'-'.seo_url($value->video_name);?>" target="_blank">
											<?php echo $value->video_name;?>
										</a>
									</h3>
									<span class="artist">
										<?php foreach($value->artist as $key2 => $artist):?>
											<?php echo ($key2 > 0 ? '/':'');?>
											<a href="<?php echo $artist_url.'summary/'.$artist->artist_id.'-'.seo_url($artist->artist_name);?>" title="<?php echo $value->video_name;?>" target="_blank"><?php echo $artist->artist_name;?></a>
										<?php endforeach;?>
									</span>
									<span class="views">
										<?php echo number_format($value->views);?>
									</span>
								</div>
							</li>
						<?php endforeach;?>
					</ul>
					</div>
					<a href="javascript:void(0);" class="btn_arrow prev" id="nav_slider_video_concert_left"></a>
					<a href="javascript:void(0);" class="btn_arrow next" id="nav_slider_video_concert_right"></a>
					<a class="readMore" target="_blank" href="http://video.you2play.com/concert/new_released">ดูทั้งหมด&nbsp;&raquo;</a>
				</div>
			<?php endif;?>
			<!--Video News-->
			<?php if(!empty($dataVideoNews)):?>
				<h2 class="subHeader">คลิปเด็ด</h2>
				<div class="cycleElementsContainer" id="slider_video_news">
					<div class="slider">
					<ul>
						<?php foreach($dataVideoNews as $key => $value):?>
							<li>
								<a class="_player" href="<?php echo $video_url.'play/'.$value->video_id.'-'.seo_url($value->video_name);?>" title="<?php echo $value->video_name;?>" target="_blank">
									<div class="image">
										<?php echo exec_image(array(
											'folder' => 'video',
											'dimension' => '140x90',
											'file_name' => @$value->video_thumb_name.'.'.@$value->video_thumb_ext,
											'alt' => ''.$value->video_name.'',	
											'title' => ''.$value->video_name.''	
											)
										);?>								
									</div>
									<div class="frame"></div>
								</a>
								<div class="info">
									<h3>					
										<a class="_player" href="<?php echo $video_url.'play/'.$value->video_id.'-'.seo_url($value->video_name);?>" title="<?php echo $value->video_name;?>" target="_blank">
											<?php echo $value->video_name;?>
										</a>
									</h3>
									<span class="artist">
										<?php foreach($value->artist as $key2 => $artist):?>
											<?php echo ($key2 > 0 ? '/':'');?>
											<a href="<?php echo $artist_url.'summary/'.$artist->artist_id.'-'.seo_url($artist->artist_name);?>" target="_blank"><?php echo $artist->artist_name;?></a>
										<?php endforeach;?>
									</span>
									<span class="views">
										<?php echo number_format($value->views);?>
									</span>
								</div>
							</li>
						<?php endforeach;?>
					</ul>
					</div>
					<a href="javascript:void(0);" class="btn_arrow prev" id="nav_slider_video_news_left"></a>
					<a href="javascript:void(0);" class="btn_arrow next" id="nav_slider_video_news_right"></a>
					<a class="readMore" target="_blank" href="http://video.you2play.com/behind_scence/new_released">ดูทั้งหมด&nbsp;&raquo;</a>
				</div>
			<?php endif;?>			
		</div>
		
		<!--News-->
		<?php if(!empty($dataNews)):?>
		<div id="home_news">
			<h2 class="homeHeader headerNews">ข่าวบันเทิงวันนี้</h2>
			<a href="<?php echo $news_url;?>" target="_blank" class="readMore">ดูทั้งหมด&nbsp;&raquo;</a>
			<div class="frame">
				<ul>
					<?php foreach($dataNews as $key => $value):?>
						<li>
							<a <?php echo ($key < 5 ? 'class="slideUp"':'class="active"');?> href="<?php echo $news_url.'archives/'.$value->news_id.'-'.seo_url($value->news_subject);?>" target="_blank">
								<div class="image">
									<?php echo exec_image(array(
										'folder' => 'news',
										'dimension' => ($key == 0 ? '325x205':($key <5 ? '140x95':'85x50')),
										'file_name' => @$value->image->news_file_name.'.'.@$value->image->news_file_ext,
										'alt' => ''.$value->news_subject.'',	
										'title' => ''.$value->news_subject.''	
										)
									);?>								
								</div>
							</a>
							<a href="<?php echo $news_url.'archives/'.$value->news_id.'-'.seo_url($value->news_subject);?>" target="_blank" class="info"><?php echo $value->news_subject;?></a>
						</li>
					<?php endforeach;?>
				</ul>
			</div>
		</div>
		<?php endif;?>
		<div id="home_movie">
			<div id="home_new_movie">
				<h2 class="homeHeader headerMovieShowing">หนังใหม่ชนโรง</h2>
				<a href="<?php echo $movie_url.'showing';?>" target="_blank" class="readMore">ดูทั้งหมด&nbsp;&raquo;</a>
				<ul class="movieBg">
					<?php if(!empty($dataMovieShowing)) foreach($dataMovieShowing as $value):?>
					<li>
						<a class="_player" href="<?php echo $movie_url.'play/'.$value->movie_id.'-'.seo_url($value->movie_name);?>" target="_blank">
							<div class="image">
								<?php echo exec_image(array(
									'folder' => 'movie',
									'dimension' => '140x210',
									'file_name' => @$value->image->movie_file_name.'.'.@$value->image->movie_file_ext,
									'alt' => ''.$value->movie_name.'',	
									'title' => ''.$value->movie_name.''	
									)
								);?>									
							</div>
							<h3><?php echo $value->movie_name;?></h3>
						</a>
					</li>
					<?php endforeach;?>															
				</ul>
			</div>
			<div id="home_coming_movie">
				<h2 class="homeHeader headerMovieComing">โปรแกรมหน้า</h2>
				<a href="<?php echo $movie_url.'coming_soon';?>" target="_blank" class="readMore">ดูทั้งหมด&nbsp;&raquo;</a>
				<ul class="movieBg">
					<?php if(!empty($dataMovieComing)) foreach($dataMovieComing as $value):?>
					<li>
						<a class="_player" href="<?php echo $movie_url.'play/'.$value->movie_id.'-'.seo_url($value->movie_name);?>" target="_blank">
							<div class="image">
								<?php echo exec_image(array(
									'folder' => 'movie',
									'dimension' => '140x210',
									'file_name' => @$value->image->movie_file_name.'.'.@$value->image->movie_file_ext,
									'alt' => ''.$value->movie_name.'',	
									'title' => ''.$value->movie_name.''	
									)
								);?>									
							</div>
							<h3><?php echo $value->movie_name;?></h3>
						</a>
					</li>
					<?php endforeach;?>															
				</ul>				
			</div>
			<div id="home_movie_clip">
				<h2 class="homeHeader headerMovieClip">คลิปเกี่ยวกับหนัง</h2>
				<a href="<?php echo $movie_url.'clip';?>" target="_blank" class="readMore">ดูทั้งหมด&nbsp;&raquo;</a>
				<div class="border">
					<ul>
						<?php if(!empty($dataMovieClip)) foreach($dataMovieClip as $key => $value):?>
							<li>
								<a class="slideUp _player" title="<?php echo $value->movie_name;?>" href="<?php echo $movie_url.'play/'.$value->movie_id.'-'.seo_url($value->movie_name);?>" target="_blank">
									<div class="image">
										<?php echo exec_image(array(
											'folder' => 'movie',
											'dimension' => ($key == 0 ? '325x210':'150x96'),
											'file_name' => @$value->image->movie_file_name.'.'.@$value->image->movie_file_ext,
											'alt' => ''.$value->movie_name.'',	
											'title' => ''.$value->movie_name.''	
											)
										);?>
										<div class="frame"></div>
									</div>
								</a>
								<a class="_player info" href="<?php echo $movie_url.'play/'.$value->movie_id.'-'.seo_url($value->movie_name);?>" target="_blank">
									<h3><?php echo $value->movie_name;?></h3>
								</a>
							</li>
						<?php endforeach;?>
					</ul>
				</div>			
			</div>
		</div>
		<div id="home_fashion">
			<h2 class="homeHeader headerFashion">แฟชั่นฮอต</h2>
			<a href="<?php echo $fashion_url;?>" target="_blank" class="readMore">ดูทั้งหมด&nbsp;&raquo;</a>
			<div class="frame">
				<ul>
					<?php if(!empty($dataFashion)) foreach($dataFashion as $value):?>
					<li>
						<a href="<?php echo $fashion_url.'archives/'.$value->fashion_id.'-'.seo_url($value->fashion_name);?>" target="_blank">
							<div class="image">
								<?php echo exec_image(array(
									'folder' => 'fashion',
									'dimension' => '140x210',
									'file_name' => @$value->image->fashion_file_name.'.'.@$value->image->fashion_file_ext,
									'alt' => ''.$value->fashion_name.'',	
									'title' => ''.$value->fashion_name.''	
									)
								);?>
							</div>
							<h3><?php echo $value->fashion_name;?></h3>
						</a>
					</li>
					<?php endforeach;?>															
				</ul>
			</div>		
		</div>
	</div>
</div>
<div id="right_side">
	<!--Module-->
	<?php
	if(!empty($module))
	foreach($module as $value):?>
	<?php echo $value;?>
	<?php endforeach;?>
</div>
<div class="clear">
</div>
<script type="text/javascript" language="javascript">
(function($) {
/*whatever jQuery stuff*/
	$(function(){
		//multipleElementsCycle
		$("#slider_hilight").multipleElementsCycle({
			scrollCount: 1,
			show: 1,
			start: 0,
			auto: true,
			prev: '#nav_slider_hilight_left',
			next: '#nav_slider_hilight_right',
			jumpTo: '.cycleToPointHighlight'			
		});
		$("#slider_music_thai").multipleElementsCycle({
			scrollCount: 4,
			show: 4,
			start: 0,
			prev: '#nav_slider_music_thai_left',
			next: '#nav_slider_music_thai_right'
		});
		$("#slider_music_inter").multipleElementsCycle({
			scrollCount: 4,
			show: 4,
			start: 0,
			prev: '#nav_slider_music_inter_left',
			next: '#nav_slider_music_inter_right'
		});
		$("#slider_music_asian").multipleElementsCycle({
			scrollCount: 4,
			show: 4,
			start: 0,
			prev: '#nav_slider_music_asian_left',
			next: '#nav_slider_music_asian_right'
		});
		$("#slider_album_review").multipleElementsCycle({
			scrollCount: 4,
			show: 4,
			start: 0,
			prev: '#nav_slider_album_review_left',
			next: '#nav_slider_album_review_right'
		});
		$("#slider_video_mv").multipleElementsCycle({
			scrollCount: 4,
			show: 4,
			start: 0,
			prev: '#nav_slider_video_mv_left',
			next: '#nav_slider_video_mv_right'
		});
		$("#slider_video_interview").multipleElementsCycle({
			scrollCount: 4,
			show: 4,
			start: 0,
			prev: '#nav_slider_video_interview_left',
			next: '#nav_slider_video_interview_right'
		});
		$("#slider_video_concert").multipleElementsCycle({
			scrollCount: 4,
			show: 4,
			start: 0,
			prev: '#nav_slider_video_concert_left',
			next: '#nav_slider_video_concert_right'
		});
		$("#slider_video_news").multipleElementsCycle({
			scrollCount: 4,
			show: 4,
			start: 0,
			prev: '#nav_slider_video_news_left',
			next: '#nav_slider_video_news_right'
		});
		//Share Social
		$('.socialShare').click(function(){
			var val_arr = $(this).attr('rel').split('-');
			$(this).colorbox({
				iframe: true,
				width:120,
				height:140,
				href:'http://'+document.domain+'/share_page?id='+val_arr[1]+'&type='+val_arr[0],
				scrolling:false
			});			
		});						
	});	
})(jQuery);
</script>